Skip to content

fix: add missing parameters for --updateService - #143

Merged
keroxp merged 4 commits into
mainfrom
service-sync-improve
Jun 4, 2026
Merged

fix: add missing parameters for --updateService#143
keroxp merged 4 commits into
mainfrom
service-sync-improve

Conversation

@keroxp

@keroxp keroxp commented Jun 1, 2026

Copy link
Copy Markdown
Member

Adapted newly introduced parameters of ecs:UpdateService / ecs:CreateService.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the --updateService rollout path to include additional ecs:UpdateService/ecs:CreateService parameters (notably capacity provider and placement-related fields), and centralizes the “copy service definition fields into UpdateServiceInput” logic into a single helper with accompanying unit tests.

Changes:

  • Extend the ECS test server mock to store additional CreateService / UpdateService fields (capacity provider strategy, placement constraints/strategy).
  • Introduce applyServiceDefinitionToUpdateInput to copy service definition fields into ecs.UpdateServiceInput and use it from the rollout executor.
  • Add unit tests for the helper and an integration-style test for nil slice behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/ecs.go Mock ECS server updated to capture additional service fields during create/update.
rollout/service_sync.go New helper to apply service definition fields to an UpdateService request.
rollout/service_sync_test.go Unit tests covering nil vs empty slice preservation in the helper.
rollout/executor.go Switch to helper to populate UpdateServiceInput when --updateService is set.
rollout/executor_test.go Update expected UpdateServiceInput fields for the --updateService path.
rollout_test.go Add integration-style test around nil optional slice handling during --updateService.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/ecs.go Outdated
Comment thread rollout_test.go Outdated
@keroxp
keroxp marked this pull request as ready for review June 2, 2026 08:58
@keroxp
keroxp requested review from a team and ChameleonO2 June 2, 2026 08:58

@takkyuuplayer takkyuuplayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@keroxp
keroxp merged commit ef9e764 into main Jun 4, 2026
1 check passed
@keroxp
keroxp deleted the service-sync-improve branch June 4, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants